package com.heima.controller;

import com.heima.pojo.entity.TaskType;
import com.heima.service.TaskTypeService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * \* User: chy
 * \* Date: 2025/8/23  14:16
 * \* Description:
 * \
 */
@RestController
@RequestMapping("/api/task-service/taskType")
@Slf4j
public class TaskTypeController {

    @Autowired
    private TaskTypeService taskTypeService;

    /**
     * 获取所有工单类型
     * @return
     */
    @GetMapping("/list")
    public List<TaskType> list() {
        List<TaskType> taskTypes = taskTypeService.list();
        return taskTypes ;
    }
}
